package com.m3958.firstgwt.client.jso;


import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.JsArray;

/**
 * 
 * @author jianglibo
 * 这里的得到的已经是response对象。
 *
 */
public class SmartResponseJso extends JavaScriptObject {
	  // Overlay types always have protected, zero-arg ctors
	  protected SmartResponseJso() { }
	  
	  public final native int getStatus()/*-{
	  	return this.status;
	  }-*/;
	  
	  public final native int getStartRow()/*-{return this.startRow;}-*/;
	  
	  public final native JavaScriptObject afterRemoveResponse()/*-{
	  		if(this.response){
	  			return this.response;
	  		}else{
	  			return this;
	  		}
	  	}-*/;
	  
	  public final native int getEndrow()/*-{return this.endRow;}-*/;
	  
	  public final native M3958ExtraJso getM3958Extra()/*-{return this.m3958extra;}-*/;
	  
	  public final native boolean getLoginExtra(String f)/*-{
	  		var mt = this.m3958extra; 
	  		$wnd.Y.log(this);
	  		if(!mt)return false;
	  		if(!mt.loginextra)return false;
	  		$wnd.Y.log(mt);
	  		$wnd.Y.log(mt.loginextra[f]);
	  		return mt.loginextra[f];
	  	}-*/;
	  
	  public final native int getTotalRows()/*-{
	  		if($wnd.Y){
	  			$wnd.Y.log(this);
	  		}
	  		return this.totalRows;
	  		}-*/;
	  
	  public final native JsArray<JavaScriptObject> getDataArray()/*-{return this.data;}-*/;
}
